layui.use('layer')
function add(url,data) {
    console.log(url);
    let result = myAjax(url,'post',data);
    if (result.code===200){
        // alert("新增成功！");
        let data = "新增成功"
        layer.msg(data.msg,{icon:1,time:1000},function () {
            let index=parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
            parent.location.reload();
        });
    }else {
        alert("新增失败，请检查输入信息是否合法！")
    }
}
function resetAdd(url) {
    location.assign(url);
}